NUM = 3 #单词个数
wordList = input("输入三个英文单词，用(, )隔开\n").split(', ')

while len(wordList) != NUM:
    print("输入错误")
    wordList = input("输入三个英文单词，用(, )隔开\n").split(', ')

#冒泡排序
for i in range(1, NUM):
    for j in range(0, NUM - i):
        if wordList[j] > wordList[j + 1]: 
            wordList[j], wordList[j + 1] = wordList[j + 1], wordList[j]

for index in range(NUM - 1):
    print(wordList[index], end = ', ')

print(wordList[NUM - 1])
input("Press any key to continue")